const getters = {
  sidebar: state => state.app.sidebar,
  device: state => state.app.device,
  token: state => state.user.token,
  avatar: state => state.user.avatar,
  name: state => state.basicSettings.name,
  permission_routes: state => state.user.routes

}

const routers = []
function formatRouters(list) {
  for (let i = 0; i < list.length; i++) {
    if (!list[i].hidden) {
      if (list[i].children) {
        if (list[i].children.length > 1) {
          routers.push(list[i])
        } else {
          routers.push(list[i].children[0])
        }
      }
    }
  }
  return routers
}
export default getters
